from django.core.management.base import BaseCommand
from import_data.models import TrainMedicalData
import pandas as pd

class Command(BaseCommand):

    def handle(self, *args, **kwargs):
        data = pd.DataFrame(list(TrainMedicalData.objects.all().values()))
        print(pd.to_datetime(data['date'])[-1])
